import Request from '@/utils/requset.js'
import {
    queryParams
} from '@/uni_modules/uv-ui-tools/libs/function/index.js'

let request = new Request().http
let uploadFile = new Request().upLoadFile
//全局定义请求头
export default {


    // 首页
    getIndex: (data) => {
        return request({
            url: 'api/index/index',
            method: "get",
            data: data,
        })
    },
    // 地区
    getArea: (data) => {
        return request({
            url: 'api/index/getarea',
            method: "get",
            data: data,
        })
    },
    // 地区
    userinfo: (data) => {
        return request({
            url: 'api/user/index',
            method: "post",
            data: data,
        })
    },
    // 门店列表 /
    getShopList: (data) => {
        return request({
            url: 'api/shop/index',
            method: "post",
            data: data,
        })
    },
    // 台球宝贝列表
    getBabyList: (data) => {
        return request({
            url: 'api/shop/get_baby_list',
            method: "post",
            data: data,
        })
    },
    // 门店详情
    getShopDetail: (data) => {
        return request({
            url: 'api/shop/detail',
            method: "post",
            data: data,
        })
    },
    getShopAssistantList: (data) => {
        return request({
            url: 'api/shop/get_assistant_list',
            method: "post",
            data: data,
        })
    },
    getShopAssistant: (data) => {
        return request({
            url: 'api/shop/get_shop_assistant',
            method: "post",
            data: data,
        })
    },
    getShopCategory: (data) => {
        return request({
            url: 'api/shop/get_shop_category',
            method: "post",
            data: data,
        })
    },
    getShopGoods: (data) => {
        return request({
            url: 'api/shop/get_shop_goods',
            method: "post",
            data: data,
        })
    },
    getShopAssistantDetail: (data) => {
        return request({
            url: 'api/shop/get_shop_assistant_detail',
            method: "post",
            data: data,
        })
    },
    getShopAssistantLike: (data) => {
        return request({
            url: 'api/shop/shop_assistant_like',
            method: "post",
            data: data,
        })
    },
    cancelAssistantLike: (data) => {
        return request({
            url: 'api/shop/cancel_shop_assistant_like',
            method: "post",
            data: data,
        })
    },

    postShopAssistantTask: (data) => {
        return request({
            url: 'api/shop/shop_assistant_yuyue',
            method: "post",
            data: data,
        })
    },
    shopgoodsCart: (data) => {
        return request({
            url: 'api/shopgoods/my_cart',
            method: "post",
            data: data,
        })
    },
    shopgoodsDel: (data) => {
        return request({
            url: 'api/shopgoods/del',
            method: "post",
            data: data,
        })
    },
    shopgoodsEdit: (data) => {
        return request({
            url: 'api/shopgoods/edit_cart',
            method: "post",
            data: data,
        })
    },
    shopgoodsDelete: (data) => {
        return request({
            url: 'api/shopgoods/delete_cart',
            method: "post",
            data: data,
        })
    },
    shopgoodsAdd: (data) => {
        return request({
            url: 'api/shopgoods/add_cart',
            method: "post",
            data: data,
        })
    },
    shopgoodsCreate: (data) => {
        return request({
            url: 'api/shopgoods/create_order',
            method: "post",
            data: data,
        })
    },

    goodsOrder: (data) => {
        return request({
            url: 'api/my/my_order_shop_goods',
            method: "post",
            data: data,
        })

    },

    articleCate: (data) => {
        return request({
            url: 'api/article/get_article_category',
            method: "post",
            data: data,
        })

    },
    articleList: (data) => {
        return request({
            url: 'api/article/index',
            method: "post",
            data: data,
        })

    },
    articleMain: (data) => {
        return request({
            url: 'api/article/view',
            method: "post",
            data: data,
        })

    },
    mallIndex: (data) => {
        return request({
            url: 'api/mall/index',
            method: "post",
            data: data,
        })

    },

    mallDetail: (data) => {
        return request({
            url: 'api/mall/detail',
            method: "post",
            data: data,
        })

    },
    mallInfo: (data) => {
        return request({
            url: 'api/mall/mall_detail',
            method: "post",
            data: data,
        })

    },
    mallGoods: (data) => {
        return request({
            url: 'api/mall/get_mall_goods',
            method: "post",
            data: data,
        })

    },

    addMallCart: (data) => {
        return request({
            url: 'api/mall/add_mall_goods_cart',
            method: "post",
            data: data,
        })

    },
    createMallOrder: (data) => {
        return request({
            url: 'api/mall/add_arena_order',
            method: "post",
            data: data,
        })

    },

    labelLst: (data) => {
        return request({
            url: 'api/index/get_label_list',
            method: "post",
            data: data,
        })
    },
    labelLsts: (data) => {
        return request({
            url: 'api/index/get_label',
            method: "post",
            data: data,
        })
    },

    aboutBall: (data) => {
        return request({
            url: 'api/Aboutball/index',
            method: "post",
            data: data,
        })
    },

    ballAdd: (data) => {
        return request({
            url: 'api/aboutball/yuyue_ball_add',
            method: "post",
            data: data,
        })
    },
    ballYingyue: (data) => {
        return request({
            url: 'api/aboutball/do_yingyue',
            method: "post",
            data: data,
        })
    },

    shopAssistantOrder: (data) => {
        return request({
            url: 'api/shop/shop_assistant_order',
            method: "post",
            data: data,
        })
    },
    shopGoods: (data) => {
        return request({
            url: 'api/my/my_order_shop_goods',
            method: "post",
            data: data,
        })
    },
    myShopAssistantOrder: (data) => {
        return request({
            url: 'api/my/my_shop_assistant_order',
            method: "post",
            data: data,
        })
    },
    yuyueAssistantOrder: (data) => {
        return request({
            url: 'api/my/my_yuyue_assistant_order',
            method: "post",
            data: data,
        })
    },
    mallOrder: (data) => {
        return request({
            url: 'api/my/my_mall_order',
            method: "post",
            data: data,
        })
    },
    tableList: (data) => {
        return request({
            url: 'api/shopgoods/get_table_list',
            method: "post",
            data: data,
        })
    },
    yuyueTable: (data) => {
        return request({
            url: 'api/shopgoods/yuyue_table',
            method: "post",
            data: data,
        })
    },
    arenaList: (data) => {
        return request({
            url: 'api/arena/index',
            method: "post",
            data: data,
        })
    },
    arenaAdd: (data) => {
        return request({
            url: 'api/arena/arena_add',
            method: "post",
            data: data,
        })
    },
    userProfile: (data) => {
        return request({
            url: 'api/user/profile',
            method: "post",
            data: data,
        })
    },
    questionList: (data) => {
        return request({
            url: 'api/article/index',
            method: "post",
            data: data,
        })
    },
    myArenaList: (data) => {
        return request({
            url: 'api/my/my_arena_list',
            method: "post",
            data: data,
        })
    },
    myJoinArena: (data) => {
        return request({
            url: 'api/my/my_join_arena',
            method: "post",
            data: data,
        })
    },

    cancelArena: (data) => {
        return request({
            url: 'api/my/cancel_arena',
            method: "post",
            data: data,
        })
    },
    myArenaDetail: (data) => {
        return request({
            url: 'api/my/my_arena_detail',
            method: "post",
            data: data,
        })
    },

    yuyueBall: (data) => {
        return request({
            url: 'api/my/my_yuyue_ball',
            method: "post",
            data: data,
        })
    },
    
    yingyueBall: (data) => {
        return request({
            url: 'api/my/my_yingyue_ball',
            method: "post",
            data: data,
        })
    },
    
    cancelYueBall: (data) => {
        return request({
            url: 'api/my/cancel_yuyue_ball',
            method: "post",
            data: data,
        })
    },
    yuyueTableOrder: (data) => {
        return request({
            url: 'api/my/my_yuyue_table_order',
            method: "post",
            data: data,
        })
    },
    cancelTableOrder: (data) => {
        return request({
            url: 'api/my/cancel_yuyue_table_order',
            method: "post",
            data: data,
        })
    },
    getSlide: (data) => {
        return request({
            url: 'api/index/get_slide',
            method: "post",
            data: data,
        })
    },
    getMallCart: (data) => {
        return request({
            url: 'api/mall/my_cart',
            method: "post",
            data: data,
        })
    },

    mallGoodsDel: (data) => {
        return request({
            url: 'api/mall/delete_cart',
            method: "post",
            data: data,
        })
    },
    mallGoodsEdit: (data) => {
        return request({
            url: 'api/mall/edit_cart',
            method: "post",
            data: data,
        })
    },
    mallGoodsDelete: (data) => {
        return request({
            url: 'api/mall/del',
            method: "post",
            data: data,
        })
    },
    mallGoodsAdd: (data) => {
        return request({
            url: 'api/mall/add_mall_goods_cart',
            method: "post",
            data: data,
        })
    },


    wechatLogin: (data) => {
        return request({
            url: 'api/user/wxMiniProgramOauth',
            method: "post",
            data: data,
        })
    },

    wechatSession: (data) => {
        return request({
            url: 'api/user/getWxMiniProgramSessionKey',
            method: "post",
            data: data,
        })
    },
    addSuggest: (data) => {
        return request({
            url: 'api/my/add_question',
            method: "post",
            data: data,
        })
    },

    joinArena: (data) => {
        return request({
            url: 'api/arena/join_arena',
            method: "post",
            data: data,
        })
    },
    
    cancelShopAssistant: (data) => {
        return request({
            url: 'api/my/cancel_shop_assistant',
            method: "post",
            data: data,
        })
    }, 
    
    getAssiatant: (data) => {
        return request({
            url: 'api/index/get_assiatant',
            method: "post",
            data: data,
        })
    },











    //

    //oss文件上传
    uploadImg: (data) => {
        return uploadFile(data)
    },







    //我的
}
/*
请求样式：
    自定义名字: function(data) {
        return request({
            url: "/banner", //请求头
            method:"GET", //请求方式 
            data: data,    //请求数据
            token: token, // 可传  
            hideLoading: false, //加载样式
        })
    },
*/